import React from 'react'
import { initStore } from '../redux/store'
import withRedux from 'next-redux-wrapper'
import Layout from 'layout/BasicLayout'
import Nav from 'layout/Nav'
import Footer from 'layout/Footer'
import AddArticle from '../components/AddArticle'
import Head from 'next/head'
import Link from 'next/link'
// 新增文章页面
class App extends React.Component {
    componentDidMount () {
    }
    componentWillUnmount () {
        //clearInterval(this.timer)
    }
    render () {
        return (
            <Layout title={`新增文章`}>
                <Head>
                    <link rel="stylesheet" href="/_next/static/style.css" />
                    <script type="text/javascript" charset="utf-8" src="/static/uedit/ueditor.config.js"></script>
                    <script type="text/javascript" charset="utf-8" src="/static/uedit/ueditor.all.js"> </script>
                    <script type="text/javascript" charset="utf-8" src="/static/js/cropbox-min.js"> </script>
                </Head>
                <Nav arr={5}/>
                <AddArticle contentId={this.props.url.query.id} />
                <Footer/>
            </Layout>
        )
    }
}

const mapDispatchToProps = (dispatch) => {
    return {
        //addCount: bindActionCreators(addCount, dispatch),
        //startClock: bindActionCreators(startClock, dispatch)
    }
}

export default withRedux(initStore, null, mapDispatchToProps)(App)